package lu.med.praxiswahl.wahlumed.client.utilities;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.MediaTracker;
import java.awt.Toolkit;

import javax.swing.JPanel;



public class MessagePrinter
{
    // static public String printLogo =
    // "C:\\Program Files\\Gynaekomedic_ERP\\message.png";
    // static public String printLogo =
    // "D:\\DATA\\Engineering\\Dr_Wahl\\env_4\\gyneakomedicClient\\message.png";
    // static public String printLogo =
    // "D:\\DATA\\Engineering\\development_zone\\apps\\wahlumed\\main\\gyneakomedicClient\\message.png";

    static public ServerUtilities utility = new ServerUtilities();

    static public String printLogo = utility.readMessageHeaderPath();
    static Image logo = Toolkit.getDefaultToolkit().getImage(printLogo);

    static public void printLetterhead(Graphics g, int width, int height)
    {
	MediaTracker mt = new MediaTracker(new JPanel());
	mt.addImage(logo, 0);
	try
	{
	    mt.waitForAll();
	}
	catch (InterruptedException ex)
	{
	}
	// Zeichnet das Logo ein
	g.drawImage(logo, 0, 0, 595, 841, null);
	// Knickstrich
	g.setColor(new Color(0, 0, 0));
	g.drawLine(0, (int) (height * 38.38), 25, (int) (height * 38.38));

    }

}
